<?php
require('config.php');
		$start=0;
		$num=10;
        $user_id=$_REQUEST['user_id'];
        if(isset($_REQUEST['start'])) $start=$_REQUEST['start'];
		if(isset($_REQUEST['num'])) $num=$_REQUEST['num'];
        //$user_id=9;
		$sql="select o.orderId,o.needPay,o.payType,g.goodsThums,g.goodsName,o.orderType,o.winningCode from `".$oto."_orders` as o,`".$oto."_order_goods` as g where o.userId='".$user_id."' and o.`orderFlag`='1' and o.orderId=g.orderId and o.orderType in ('4','5') order by o.createTime DESC LIMIT $start,$num";
		//file_put_contents("tsxx.txt", "\r\n".$sql."\r\n", FILE_APPEND);
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$jf_jilu[]=$row;//将取得的所有数据赋值给person_info数组
		}
		if(isset($jf_jilu)) echo json_encode($jf_jilu);
		else echo '[]';
?>